import  http from '@/utils/http';

export async function formList(params) {
  return http.get('/form/list',params);
}

export async function formRemove(params) {
  return http.post('/form/delete',params);
}

export async function formAdd(params) {
  return http.post('/form/add',params);
}

//编辑表单名称/分类
export async function formEdit(params) {
  return http.post('/form/edit',params);
}

export async function formTabList(params) {
  return http.get('/form/category/info',params);
}

export async function formConfigTabList(params) {
  return http.get('/robot/categoryConfig/form/info',params);
}

export async function formTabEdit(params) {
  return http.post('/form/category/edit',params);
}

export async function formStatus(params) {
  return http.post('/form/disabled',params);
}

//获取表单详情
export async function formInfo(params) {
  return http.get('/form/info',params);
}

//数据字典
export async function formDictionaryList(params) {
  return http.get('/form/dictionary/list',params);
}

export async function formDictionaryUpdate(params) {
  return http.post('/form/dictionary/addOrUpdate',params);
}

export async function formDictionaryInfo(params) {
  return http.get('/form/dictionary/info',params);
}

export async function formDictionaryDelete(params) {
  return http.post('/form/dictionary/delete',params);
}

export async function formDictionaryColumn(params) {
  return http.post('/form/dictionary/getColumn',params);
}

export async function formDictionaryExport(params) {
  return http.downloadFile('/form/dictionary/export',params);
}

export async function formDictionaryImport(params) {
  return http.uploadFile('/form/dictionary/import',params);
}

export async function formDictionaryDownload(params) {
  return http.downloadFile('/form/dictionary/download',params);
}

export async function formDictionaryColumnTree(params) {
  return http.post('/form/dictionary/getColumnTree',params);
}


//流程配置
export async function formFlowTemplate(params) {
  return http.get('/form/flow/getFormTemplate',params);
}

export async function formFlowTemplateSave(params) {
  return http.post('/form/flow/template',params);
}

export async function formFlowNode(params) {
  return http.get('/form/flow/stage',params);
}
export async function formFlowNodeSave(params) {
  return http.post('/form/flow/stage',params);
}

//字段配置
export async function formFieldSave(params) {
  return http.post('/form/field/add',params);
}

export async function formFieldEdit(params) {
  return http.post('/form/field/edit',params);
}

export async function formFieldList(params) {
  return http.get('/form/field/list',params);
}

export async function formFieldInfo(params) {
  return http.get('/form/field/info',params);
}

export async function formFieldMove(params) {
  return http.post('/form/field/move',params);
}

export async function formFieldDisabled(params) {
  return http.post('/form/field/disabled',params);
}

export async function formFieldDelete(params) {
  return http.post('/form/field/delete',params);
}

//报表配置
export async function formReportInfo(params) {
  return http.get('/form/configuration/info',params);
}

export async function formReportUpdate(params) {
  return http.post('/form/configuration/update',params);
}

export async function formReportList(params) {
  return http.get('/form/record/list',params);
}

export async function formReportListInfo(params) {
  return http.get('/form/record/info',params);
}

export async function formPush(params) {
  return http.get('/form/push',params);
}